using System.Windows.Media.Media3D;

namespace Sinacor.Infra.UI.Controls.SmartClient
{
	public class VForm : ViewStateBase
	{
		protected override Motion GetPreviousMotion(int index)
		{
			Motion m = new Motion();

			m.Axis = new Vector3D(0, 1, 0);
			m.X = -1*(Owner.FrontItemGap + Owner.ItemGap*(Owner.SelectedIndex - index));
			m.Z = -1*Owner.ItemGap*(Owner.SelectedIndex - index);
			return m;
		}

		protected override Motion GetNextMotion(int index)
		{
			Motion m = new Motion();

			m.Axis = new Vector3D(0, 1, 0);
			m.X = Owner.FrontItemGap + Owner.ItemGap*(index - Owner.SelectedIndex);
			m.Z = -1*Owner.ItemGap*(index - Owner.SelectedIndex);
			return m;
		}

		protected override Motion GetSelectionMotion(int index)
		{
			Motion m = new Motion();

			m.Axis = new Vector3D(0, 1, 0);
			m.Z = Owner.PopoutDistance;

			return m;
		}
	}
}